/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kmcsoft.goldshop.model.master;

import com.kmcsoft.demography.entity.Address;
import com.kmcsoft.emaster.entity.TrackableEntity;
import java.util.Date;
import java.util.List;
import javax.jdo.annotations.FetchGroup;
import javax.jdo.annotations.FetchGroups;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

/**
 *
 * @author kmcsoft02
 */
@PersistenceCapable(detachable = "true", table = "SHOP_PAWN")
@FetchGroups(value = {
    @FetchGroup(name = "detach_Pawn_All", members = {
        @Persistent(name = "historys"),
        @Persistent(name = "address"),
        @Persistent(name = "createdBy")}),
    @FetchGroup(name = "detach_Pawn_CreatedBy", members = {
        @Persistent(name = "createdBy")}),
    @FetchGroup(name = "detach_Pawn_PawnHistory", members = {
        @Persistent(name = "historys")})
})
public class Pawn extends TrackableEntity {

    public static final int STATUS_JUST_CREATE = 0;
    public static final int STATUS_PAY_INTEREST = 1;
    public static final int STATUS_INCREASE_AMOUNT = 2;
    public static final int STATUS_LIQUIDATION = 3;
    public static final int STATUS_LOST_BILL = 4;
    public static final int STATUS_REDEMPTION = 5;
    private String code;
    private String name;
    private String customer;
    private Address address;
    private double amount;
    private Date startedDate;
    private Date expiredDate;
    private String interestPaymentDay;
    private double interestPercentPerTerm;
    private double interestAmountPerTerm;
    private String term;
    private List<PawnHistory> historys;
    private String status;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCustomer() {
        return customer;
    }

    public void setCustomer(String customer) {
        this.customer = customer;
    }

    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public Date getStartedDate() {
        return startedDate;
    }

    public void setStartedDate(Date startedDate) {
        this.startedDate = startedDate;
    }

    public Date getExpiredDate() {
        return expiredDate;
    }

    public void setExpiredDate(Date expiredDate) {
        this.expiredDate = expiredDate;
    }

    public String getInterestPaymentDay() {
        return interestPaymentDay;
    }

    public void setInterestPaymentDay(String interestPaymentDay) {
        this.interestPaymentDay = interestPaymentDay;
    }

    public double getInterestPercentPerTerm() {
        return interestPercentPerTerm;
    }

    public void setInterestPercentPerTerm(double interestPercentPerTerm) {
        this.interestPercentPerTerm = interestPercentPerTerm;
    }

    public double getInterestAmountPerTerm() {
        return interestAmountPerTerm;
    }

    public void setInterestAmountPerTerm(double interestAmountPerTerm) {
        this.interestAmountPerTerm = interestAmountPerTerm;
    }

    public String getTerm() {
        return term;
    }

    public void setTerm(String term) {
        this.term = term;
    }

    public List<PawnHistory> getHistorys() {
        return historys;
    }

    public void setHistorys(List<PawnHistory> historys) {
        this.historys = historys;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
    
    
}
